Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Active accounts chart 2 #1006

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open

Conversation

janmichek
Copy link
Collaborator

@janmichek janmichek commented Dec 11, 2024

Description

Resolves #863

Demo

image image image

Checklist:

  • I have read and followed the Contributing Guide
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

🧪️ Preview Links 🔎️

Mainnet: https://pr-1006-aescan.stg.service.aepps.com
Testnet: https://pr-1006-aescan-testnet.stg.service.aepps.com

Copy link
Collaborator

@michele-franchi michele-franchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good, I proposed a different way to display active accounts numbers.

src/components/AccountsChartPanel.vue Outdated Show resolved Hide resolved
src/components/AccountsChartPanel.vue Outdated Show resolved Hide resolved
src/components/AccountsChartPanel.vue Outdated Show resolved Hide resolved
<hint-tooltip>
{{ aeCoinHints.activeAccounts }}
</hint-tooltip>
Latest Active Accounts
Copy link
Collaborator

@michele-franchi michele-franchi Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of displaying "Latest Active Accounts" in the Ae coin page I would suggest to add:

  • Total accounts
  • Active accounts (24h)

A stats panel in the /accounts page, like it's done for /transactions, as it's more related to accounts rather than the native coin itself and seems more consistent to me?

Something like:
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, sure good suggestion. I can extend i.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

displaying "Latest Active Accounts" in the Ae coin page

This was a direct requirement before tho, it think from Nikola. So I will keep it + extend it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

src/components/DifficultyChartPanel.vue Outdated Show resolved Hide resolved
janmichek and others added 5 commits December 12, 2024 14:12
Co-authored-by: Michele F. <michele-franchi@users.noreply.github.com>
Co-authored-by: Michele F. <michele-franchi@users.noreply.github.com>
Co-authored-by: Michele F. <michele-franchi@users.noreply.github.com>
Co-authored-by: Michele F. <michele-franchi@users.noreply.github.com>
totalAccountsCount.value = null
const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/stats/total-accounts?interval_by=month&limit=100`)
// todo ask mdw for endpoint
totalAccountsCount.value = data.data.reduce((total, item) => total + parseInt(item.count), 0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works based on manually summing the accounts from time fragments. Which is ok for now, not a clean solution.
Clean solution followup #1009

<td>$ {{ formatNullable(formatNumber(coinW?.price)) }}</td>
<td>$ {{ formatNullable(formatNumber(coinW?.volume)) }}</td>
</tr>
<thead>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup not related

@@ -27,27 +27,15 @@ const chartsStore = useChartsStore()
const { hashrateStatistics } = storeToRefs(chartsStore)
const { fetchHashrateStatistics } = chartsStore

const props = defineProps({
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all cleanup and lil refactoring

class="transactions-panel"/>
<transactions-panel class="transactions-panel"/>
</template>
<transactions-statistics class="transactions-panel"/>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

united with accounts now, i improved the content jumping when loading. Still, some more work to be done, but much better now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Active accounts chart
2 participants